﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
//using BTGISWASECO.BusinessEntities;

/// <summary>
/// Summary description for MayBomEntities
/// </summary>
namespace BTGISWASECO.BusinessEntities
{
    public class MayBomEntities
    {
        #region khai bao thuoc tinh
        private int _objectID;
        private string _IDMayBom;
        private double _LuuLuongTK;
        private double _LuuLuongCD;
        private double _ApLucTK;
        private double _ApLucCD;
        private int _NhanHieuMB;
        private string _NhanHieuMBText;
        private int _NhaSanXuat;
        private string _NhaSanXuatText;
        private int _NuocSanXuat;
        private string _NuocSanXuatText;
        private DateTime _NgayLDMayBom;
        private string _KieuMayBom;
        private string _KieuMayBomText;
        private string _ChucNang;
        private double _DuongKinhOH;
        private double _DuongKinhOD;
        private double _RPM;
        private double _CongSuatDC;
        private double _CuongDotDC;
        private double _HieuSuat;
        private double _GocLechPha;
        private int _TinhTrang;
        private string _TinhTrangText;
        private DateTime _NgayLDBienTan;
        private int _NhaSxBienTan;
        private string _NhaSxBienTanText;
        private int _NuocSxBienTan;
        private string _NuocSxBienTanText;
        private int _TinhTrangBT;
        private string _TinhTrangBTText;
        private int _DonViQL;
        private string _DonViQLText;
        private int _ThuocSoHuu;
        private string _ThuocSoHuuText;
        private string _MoTaViTri;
        private DateTime _NgayCNCuoi;
        private string _NguoiCNCuoi;
        private int _SoLanSuCo;
        private string _IDTramBom;
        private string _IDHinhAnh;

        public DateTime NgayLDBienTan
        {
            get { return _NgayLDBienTan; }
            set { _NgayLDBienTan = value; }
        }
        

        public double GocLechPha
        {
            get { return _GocLechPha; }
            set { _GocLechPha = value; }
        }

        public double HieuSuat
        {
            get { return _HieuSuat; }
            set { _HieuSuat = value; }
        }

        public double CuongDotDC
        {
            get { return _CuongDotDC; }
            set { _CuongDotDC = value; }
        }

        public double CongSuatDC
        {
            get { return _CongSuatDC; }
            set { _CongSuatDC = value; }
        }

        public double RPM
        {
            get { return _RPM; }
            set { _RPM = value; }
        }

        public double DuongKinhOD
        {
            get { return _DuongKinhOD; }
            set { _DuongKinhOD = value; }
        }

        public string KieuMayBomText
        {
            get { return _KieuMayBomText; }
            set { _KieuMayBomText = value; }
        }


        public string IDHinhAnh
        {
            get { return _IDHinhAnh; }
            set { _IDHinhAnh = value; }
        }

        public string IDTramBom
        {
            get { return _IDTramBom; }
            set { _IDTramBom = value; }
        }


        public DateTime NgayLDMayBom
        {
            get { return _NgayLDMayBom; }
            set { _NgayLDMayBom = value; }
        }

        public string DonViQLText
        {
            get { return _DonViQLText; }
            set { _DonViQLText = value; }
        }
        
        public int DonViQL
        {
            get { return _DonViQL; }
            set { _DonViQL = value; }
        }

        public string TinhTrangBTText
        {
            get { return _TinhTrangBTText; }
            set { _TinhTrangBTText = value; }
        }

        public int TinhTrangBT
        {
            get { return _TinhTrangBT; }
            set { _TinhTrangBT = value; }
        }

        public string ChucNang
        {
            get { return _ChucNang; }
            set { _ChucNang = value; }
        }

        public int SoLanSuCo
        {
            get { return _SoLanSuCo; }
            set { _SoLanSuCo = value; }
        }

        public string NhaSanXuatText
        {
            get { return _NhaSanXuatText; }
            set { _NhaSanXuatText = value; }
        }


        public string ThuocSoHuuText
        {
            get { return _ThuocSoHuuText; }
            set { _ThuocSoHuuText = value; }
        }

        public string TinhTrangText
        {
            get { return _TinhTrangText; }
            set { _TinhTrangText = value; }
        }

        public string NuocSanXuatText
        {
            get { return _NuocSanXuatText; }
            set { _NuocSanXuatText = value; }
        }

        public string NhanHieuMBText
        {
            get { return _NhanHieuMBText; }
            set { _NhanHieuMBText = value; }
        }

        public string NuocSxBienTanText
        {
            get { return _NuocSxBienTanText; }
            set { _NuocSxBienTanText = value; }
        }


        public int NhaSxBienTan
        {
            get { return _NhaSxBienTan; }
            set { _NhaSxBienTan = value; }
        }

        public string NhaSxBienTanText
        {
            get { return _NhaSxBienTanText; }
            set { _NhaSxBienTanText = value; }
        }

        public int NhaSanXuat
        {
            get { return _NhaSanXuat; }
            set { _NhaSanXuat = value; }
        }

        public double LuuLuongCD
        {
            get { return _LuuLuongCD; }
            set { _LuuLuongCD = value; }
        }

        public string NguoiCNCuoi
        {
            get { return _NguoiCNCuoi; }
            set { _NguoiCNCuoi = value; }
        }
        
        public DateTime NgayCNCuoi
        {
            get { return _NgayCNCuoi; }
            set { _NgayCNCuoi = value; }
        }

        public int ThuocSoHuu
        {
            get { return _ThuocSoHuu; }
            set { _ThuocSoHuu = value; }
        }
        
        public string KieuMayBom
        {
            get { return _KieuMayBom; }
            set { _KieuMayBom = value; }
        }
        
        public int TinhTrang
        {
            get { return _TinhTrang; }
            set { _TinhTrang = value; }
        }

        public double LuuLuongTK
        {
            get { return _LuuLuongTK; }
            set { _LuuLuongTK = value; }
        }
        
        public string MoTaViTri
        {
            get { return _MoTaViTri; }
            set { _MoTaViTri = value; }
        }

        public double ApLucTK
        {
            get { return _ApLucTK; }
            set { _ApLucTK = value; }
        }

        public double ApLucCD
        {
            get { return _ApLucCD; }
            set { _ApLucCD = value; }
        }

        public int NuocSanXuat
        {
            get { return _NuocSanXuat; }
            set { _NuocSanXuat = value; }
        }

        public int NhanHieuMB
        {
            get { return _NhanHieuMB; }
            set { _NhanHieuMB = value; }
        }

        public int NuocSxBienTan
        {
            get { return _NuocSxBienTan; }
            set { _NuocSxBienTan = value; }
        }
        
        public int OBJECTID
        {
            get { return _objectID; }
            set { _objectID = value; }
        }

        public string IDMayBom
        {
            get { return _IDMayBom; }
            set { _IDMayBom = value; }
        }

        public double DuongKinhOH
        {
            get { return _DuongKinhOH; }
            set { _DuongKinhOH = value; }
        }

        # endregion khai bao

        #region phuong thuc

        public MayBomEntities()
        {

        }

        public MayBomEntities(string IDMayBom, double LuuLuongTK, double LuuLuongCD,
                            double ApLucTK, double ApLucCD, int NhanHieuMB, int NhaSanXuat,
                            int NuocSanXuat, DateTime NgayLDMayBom, string KieuMayBom, string ChucNang,
                            double DuongKinhOH, double DuongKinhOD, double RPM, double CongSuatDC,
                            double CuongDotDC, double HieuSuat, double GocLechPha, int TinhTrang,
                            DateTime NgayLDBienTan, int NhaSxBienTan, int NuocSxBienTan, int TinhTrangBT,
                            int DonViQL, int ThuocSoHuu, string MoTaViTri, DateTime NgayCNCuoi,
                            string NguoiCNCuoi, int SoLanSuCo, string IDTramBom, string IDHinhAnh)
        {
            this._IDMayBom = IDMayBom;
            this._LuuLuongTK = LuuLuongTK;
            this._LuuLuongCD = LuuLuongCD;
            this._ApLucTK = ApLucTK;
            this._ApLucCD = ApLucCD;
            this._NhanHieuMB = NhanHieuMB;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NgayLDMayBom = NgayLDMayBom;
            this._KieuMayBom = KieuMayBom;
            this._ChucNang = ChucNang;
            this._DuongKinhOH = DuongKinhOH;
            this._DuongKinhOD = DuongKinhOD;
            this._RPM = RPM;
            this._CongSuatDC = CongSuatDC;
            this._CuongDotDC = CuongDotDC;
            this._HieuSuat = HieuSuat;
            this._GocLechPha = GocLechPha;
            this._TinhTrang = TinhTrang;
            this._NgayLDBienTan = NgayLDBienTan;
            this._NhaSxBienTan = NhaSxBienTan;
            this._NuocSxBienTan = NuocSxBienTan;
            this._TinhTrangBT = TinhTrangBT;
            this._DonViQL = DonViQL;
            this._ThuocSoHuu = ThuocSoHuu;           
            this._MoTaViTri = MoTaViTri;
            this._NgayCNCuoi = NgayCNCuoi;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._SoLanSuCo = SoLanSuCo;
            this._IDTramBom = IDTramBom;
            this._IDHinhAnh = IDHinhAnh;

        }
        public MayBomEntities(int OBJECTID, string IDMayBom, double LuuLuongTK, double LuuLuongCD,
                            double ApLucTK, double ApLucCD, int NhanHieuMB, int NhaSanXuat,
                            int NuocSanXuat, DateTime NgayLDMayBom, string KieuMayBom, string ChucNang,
                            double DuongKinhOH, double DuongKinhOD, double RPM, double CongSuatDC,
                            double CuongDotDC, double HieuSuat, double GocLechPha, int TinhTrang,
                            DateTime NgayLDBienTan, int NhaSxBienTan, int NuocSxBienTan, int TinhTrangBT,
                            int DonViQL, int ThuocSoHuu, string MoTaViTri, DateTime NgayCNCuoi,
                            string NguoiCNCuoi, int SoLanSuCo, string IDTramBom, string IDHinhAnh)
        {
            this._objectID = OBJECTID;
            this._IDMayBom = IDMayBom;
            this._LuuLuongTK = LuuLuongTK;
            this._LuuLuongCD = LuuLuongCD;
            this._ApLucTK = ApLucTK;
            this._ApLucCD = ApLucCD;
            this._NhanHieuMB = NhanHieuMB;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NgayLDMayBom = NgayLDMayBom;
            this._KieuMayBom = KieuMayBom;
            this._ChucNang = ChucNang;
            this._DuongKinhOH = DuongKinhOH;
            this._DuongKinhOD = DuongKinhOD;
            this._RPM = RPM;
            this._CongSuatDC = CongSuatDC;
            this._CuongDotDC = CuongDotDC;
            this._HieuSuat = HieuSuat;
            this._GocLechPha = GocLechPha;
            this._TinhTrang = TinhTrang;
            this._NgayLDBienTan = NgayLDBienTan;
            this._NhaSxBienTan = NhaSxBienTan;
            this._NuocSxBienTan = NuocSxBienTan;
            this._TinhTrangBT = TinhTrangBT;
            this._DonViQL = DonViQL;
            this._ThuocSoHuu = ThuocSoHuu;
            this._MoTaViTri = MoTaViTri;
            this._NgayCNCuoi = NgayCNCuoi;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._SoLanSuCo = SoLanSuCo;
            this._IDTramBom = IDTramBom;
            this._IDHinhAnh = IDHinhAnh;
        }

        public MayBomEntities(DataRow row)
        {
            this._objectID = Convert.ToInt32(row["OBJECTID"]);
            this._IDMayBom = row["IDMayBom "].ToString();
            if (row["LuuLuongTK"].ToString() != "Null")
                this._LuuLuongTK = Convert.ToDouble(row["LuuLuongTK"]);
            if (row["LuuLuongCD"].ToString() != "Null")
                this._LuuLuongCD = Convert.ToDouble(row["LuuLuongCD"]);
            if (row["ApLucTK"].ToString() != "Null")
                this._ApLucTK = Convert.ToDouble(row["ApLucTK"]);
            if (row["ApLucCD"].ToString() != "Null")
                this._ApLucCD = Convert.ToDouble(row["ApLucCD"]);
            this._NhanHieuMBText = row["NhanHieuMB"].ToString();
            this._NhaSanXuatText = row["NhaSanXuat"].ToString();
            this._NuocSanXuatText = row["NuocSanXuat"].ToString();
            if (row["NgayLDMayBom"].ToString() != "Null")
                this._NgayLDMayBom = Convert.ToDateTime(row["NgayLDMayBom"]);
            this._KieuMayBom = row["KieuMayBom"].ToString();
            this._ChucNang = row["ChucNang"].ToString();
            if (row["DuongKinhOH"].ToString() != "Null")
                this._DuongKinhOH = Convert.ToDouble(row["DuongKinhOH"]);
            if (row["DuongKinhOD"].ToString() != "Null")
                this._DuongKinhOD = Convert.ToDouble(row["DuongKinhOD"]);
            if (row["RPM"].ToString() != "Null")
                this._RPM = Convert.ToDouble(row["RPM"]);
            if (row["CongSuatDC"].ToString() != "Null")
                this._CongSuatDC = Convert.ToDouble(row["CongSuatDC"]);
            if (row["CuongDotDC"].ToString() != "Null")
                this._CuongDotDC = Convert.ToDouble(row["CuongDotDC"]);
            if (row["HieuSuat"].ToString() != "Null")
                this._HieuSuat = Convert.ToDouble(row["HieuSuat"]);
            if (row["GocLechPha"].ToString() != "Null")
                this._GocLechPha = Convert.ToDouble(row["GocLechPha"]);
            this._TinhTrangText = row["TinhTrang"].ToString();
            if (row["NgayLDBienTan"].ToString() != "Null")
                this._NgayLDBienTan = Convert.ToDateTime(row["NgayLDBienTan"]);
            this._NhaSxBienTanText = row["NhaSxBienTan"].ToString();
            this._NuocSxBienTanText = row["NuocSxBienTan"].ToString();
            this._TinhTrangBTText = row["TinhTrangBT"].ToString();
            this._DonViQLText = row["DonViQL"].ToString();
            this._ThuocSoHuuText = row["ThuocSoHuu"].ToString();
            this._MoTaViTri = row["MoTaViTri "].ToString();
            if (row["NgayCNCuoi"].ToString() != "Null")
                this._NgayCNCuoi = Convert.ToDateTime(row["NgayCNCuoi"]);
            this._NguoiCNCuoi = row["NguoiCNCuoi"].ToString();
            this._SoLanSuCo = Convert.ToInt32(row["SoLanSuCo"]);
            this._IDTramBom = row["IDTramBom "].ToString();
            this._IDHinhAnh = row["IDHinhAnh "].ToString();
        }


        #endregion phuong thuc
    }
}